<template>
    <div>
        <h1>用户管理</h1>
        <!-- <router-link to="/user/login?username=tom&password=123" tag="span">登录</router-link> | -->
        <!-- <router-link :to="{
            path:'/user/login',
            query:{
                username:'jack',
                password:123
            }
        }" tag="span">登录</router-link> | -->
        <router-link :to="{
            name:'login',
            query:{
                username:'jack',
                password:123
            }
        }" tag="span">登录</router-link> |
        <!-- <router-link to="/user/register/alice/18/female" tag="span">注册</router-link> -->
        <!-- <router-link :to="{
            name:'register',
            params:{
                name:'lucy',
                age:20,
                sex:'male'
            }
        }" tag="span">注册</router-link> -->
        <button @click="goRegister">注册</button>
        <hr>

        <router-view></router-view>
    </div>
</template>

<script>
export default {
    data(){
        return {
            
        }
    },
    methods: {
        goRegister(){
            // this.$router.push('/user/register/alice/18/female') 
            this.$router.push({
                name:'register',
                params:{
                    name:'lucy',
                    age:20,
                    sex:'male'
                }
            }) 
        }
    },
}
</script>

<style lang="less" scoped>
    
</style>